//
//  HMVistorView.m
//  OC新浪微博
//
//  Created by wyman on 16/4/10.
//  Copyright © 2016年 wyman. All rights reserved.
//

#import "HMVistorView.h"
@interface HMVistorView()


@end
@implementation HMVistorView

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {

    }
    //创建核心动画

    
    
    return [[[NSBundle mainBundle] loadNibNamed:@"HMVistorView" owner:self options:nil]lastObject];
}
-(void)changgeImage:(NSString *)imageName lable:(NSString *)label
{
    self.circleView.image = [UIImage imageNamed:imageName];
    
    self.labelView.text = label;


}

-(void)startRotate
{
    CABasicAnimation *bas = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
    NSNumber *num = [NSNumber numberWithDouble: M_PI*2];
    bas.toValue =  num ;
    bas.repeatCount = MAXFLOAT;
    bas.duration = 20;
    bas.removedOnCompletion = NO;
    [self.circleView.layer addAnimation:bas forKey:nil];
}
- (IBAction)regist {
    self.regsitDidClick();
}
- (IBAction)login {
    self.loginDidClick();
}


@end
